namespace Shell32
{
    using System;
    using System.Runtime.CompilerServices;
    using System.Runtime.InteropServices;

    [ComImport, Guid("13709620-C279-11CE-A49E-444553540000"), ClassInterface((short)0), TypeLibType((short)2)]
    public class ShellClass : Shell, IShellDispatch5
    {
        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60040000)]
        public virtual extern void AddToRecent([In, MarshalAs(UnmanagedType.Struct)] object varFile, [In, Optional, MarshalAs(UnmanagedType.BStr)] string bstrCategory);

        [return: MarshalAs(UnmanagedType.Interface)]
        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020003)]
        public virtual extern Folder BrowseForFolder([In] int Hwnd, [In, MarshalAs(UnmanagedType.BStr)] string Title, [In] int Options, [In, Optional, MarshalAs(UnmanagedType.Struct)] object RootFolder);

        [return: MarshalAs(UnmanagedType.Struct)]
        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030007)]
        public virtual extern object CanStartStopService([In, MarshalAs(UnmanagedType.BStr)] string ServiceName);

        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x6002000a)]
        public virtual extern void CascadeWindows();

        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020016)]
        public virtual extern void ControlPanelItem([In, MarshalAs(UnmanagedType.BStr)] string bstrDir);

        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x6002000f)]
        public virtual extern void EjectPC();

        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020006)]
        public virtual extern void Explore([In, MarshalAs(UnmanagedType.Struct)] object vDir);

        [return: MarshalAs(UnmanagedType.Struct)]
        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60050002)]
        public virtual extern object ExplorerPolicy([In, MarshalAs(UnmanagedType.BStr)] string bstrPolicyName);

        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020009)]
        public virtual extern void FileRun();

        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020014)]
        public virtual extern void FindComputer();

        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020013)]
        public virtual extern void FindFiles();

        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030002)]
        public virtual extern void FindPrinter([In, Optional, MarshalAs(UnmanagedType.BStr)] string Name, [In, Optional, MarshalAs(UnmanagedType.BStr)] string location, [In, Optional, MarshalAs(UnmanagedType.BStr)] string model);

        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60050003)]
        public virtual extern bool GetSetting([In] int lSetting);

        [return: MarshalAs(UnmanagedType.Struct)]
        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030003)]
        public virtual extern object GetSystemInformation([In, MarshalAs(UnmanagedType.BStr)] string Name);

        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020012)]
        public virtual extern void Help();

        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030000)]
        public virtual extern int IsRestricted([In, MarshalAs(UnmanagedType.BStr)] string Group, [In, MarshalAs(UnmanagedType.BStr)] string Restriction);

        [return: MarshalAs(UnmanagedType.Struct)]
        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030006)]
        public virtual extern object IsServiceRunning([In, MarshalAs(UnmanagedType.BStr)] string ServiceName);

        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020007)]
        public virtual extern void MinimizeAll();

        [return: MarshalAs(UnmanagedType.Interface)]
        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020002)]
        public virtual extern Folder NameSpace([In, MarshalAs(UnmanagedType.Struct)] object vDir);

        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020005)]
        public virtual extern void Open([In, MarshalAs(UnmanagedType.Struct)] object vDir);

        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020015)]
        public virtual extern void RefreshMenu();

        [return: MarshalAs(UnmanagedType.Struct)]
        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030004)]
        public virtual extern object ServiceStart([In, MarshalAs(UnmanagedType.BStr)] string ServiceName, [In, MarshalAs(UnmanagedType.Struct)] object Persistent);

        [return: MarshalAs(UnmanagedType.Struct)]
        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030005)]
        public virtual extern object ServiceStop([In, MarshalAs(UnmanagedType.BStr)] string ServiceName, [In, MarshalAs(UnmanagedType.Struct)] object Persistent);

        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020010)]
        public virtual extern void SetTime();

        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030001)]
        public virtual extern void ShellExecute([In, MarshalAs(UnmanagedType.BStr)] string File, [In, Optional, MarshalAs(UnmanagedType.Struct)] object vArgs, [In, Optional, MarshalAs(UnmanagedType.Struct)] object vDir, [In, Optional, MarshalAs(UnmanagedType.Struct)] object vOperation, [In, Optional, MarshalAs(UnmanagedType.Struct)] object vShow);

        [return: MarshalAs(UnmanagedType.Struct)]
        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60030008)]
        public virtual extern object ShowBrowserBar([In, MarshalAs(UnmanagedType.BStr)] string bstrClsid, [In, MarshalAs(UnmanagedType.Struct)] object bShow);

        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x6002000d)]
        public virtual extern void ShutdownWindows();

        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x6002000e)]
        public virtual extern void Suspend();

        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x6002000c)]
        public virtual extern void TileHorizontally();

        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x6002000b)]
        public virtual extern void TileVertically();

        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60050001)]
        public virtual extern void ToggleDesktop();

        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020011)]
        public virtual extern void TrayProperties();

        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020008)]
        public virtual extern void UndoMinimizeALL();

        [return: MarshalAs(UnmanagedType.IDispatch)]
        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020004)]
        public virtual extern object Windows();

        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60050000)]
        public virtual extern void WindowsSecurity();

        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60060000)]
        public virtual extern void WindowSwitcher();

        [DispId(0x60020000)]
        public virtual extern object Application { [return: MarshalAs(UnmanagedType.IDispatch)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020000)] get; }

        [DispId(0x60020001)]
        public virtual extern object Parent { [return: MarshalAs(UnmanagedType.IDispatch)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020001)] get; }

        //[DispId(0x60020000)]
        //public virtual object Shell32.IShellDispatch5.Application { [return: MarshalAs(UnmanagedType.IDispatch)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020000)] get; }

        //[DispId(0x60020001)]
        //public virtual object Shell32.IShellDispatch5.Parent { [return: MarshalAs(UnmanagedType.IDispatch)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020001)] get; }
    }
}

